<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Upload file</title>
<script type="text/javascript">
function uploadFile() {
	var file = document.getElementById('fileToUpload').files[0];
	var data = new FormData();
	data.append("file", file);
	var xmlhttp;
	if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
  		xmlhttp=new XMLHttpRequest();
  	} else {// code for IE6, IE5
  		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  	}
	xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {
    		document.getElementById("result").innerHTML=xmlhttp.responseText;
    	}
  	}

	xmlhttp.open('POST', 'uploadData', true);
	xmlhttp.send(data);
}
</script>
</head>
<body>
<a href="index.html">Reports</a>
<hr/>
<form>
<input type="file" name="fileToUpload" id="fileToUpload"/>
<br/>
<input type="button" id="upload" value="Upload" onclick="uploadFile()"/>
</form>
<div id="result"></div>
</body>
</html>